<extend name="Public/base"/>

<block name="body">

	 <link href="__CSS__/list.css" rel="stylesheet">
	 <div class="container">
	 	
	 	<include file="category" />
	 	
	 	<div class="row">
	 		<include file="recommend_goods" />
	 	</div>
	 	<div class="row">
	 		<ul class="nav nav-tabs">
		  <li role="presentation" class="<eq name="sort" value="ctime">active</eq>"><a href="{:U('Goods/cate',array('id'=>$cate['id']))}">默认</a></li>
		  <li role="presentation" class="<eq name="sort" value="volume">active</eq>"><a href="{:U('Goods/cate',array('id'=>$cate['id'],'sort'=>'volume'))}">销量</a></li>
		  <li role="presentation" class="<eq name="sort" value="price">active</eq>"><a href="{:U('Goods/cate',array('id'=>$cate['id'],'sort'=>'price'))}">价格</a></li>
		  <li role="presentation" class="<eq name="sort" value="hits">active</eq>"><a href="{:U('Goods/cate',array('id'=>$cate['id'],'sort'=>'hits'))}">浏览量</a></li>
		</ul>
	 	</div>
	 	<div class="row">
	 		<include file="Public:goods_list" />
	 	</div>
	 	
	 	<notempty name="_page">
    	 <div class="row">
	        	<div class="col-md-12">
	        		<nav>
					  <ul class="pagination">
					    {$_page}
					  </ul>
					</nav>
	            
	            </div>
	      </div>
  	  </notempty>
      </div>	 
</block>
<block name="script">
<script>
	$(function(){
		$('.goods-list').find('li').each(function(){

			a = $('.goods-list').innerWidth()/4*1.4;
			b = $('.goods-list').innerWidth()/4*0.95;
			$(this).find('.goods-pic').each(function(){
				$(this).innerHeight(Math.round(b)-1);	
			});
			$(this).innerHeight(Math.round(a)-1);	
			
		});
		$(".goods-list li").hover(
 				function(){
 				   //当鼠标放上去的时候,程序处理
 				   $(this).addClass("hover1 hover");
 				},
 				function(){
 				   //当鼠标离开的时候,程序处理
 				   $(this).removeClass("hover1 hover");
 		});
 		highlight_subnav("{:U('Goods/cate',array('id'=>$cate['id']))}");
 		
		$('.category-item').find('a[href="'+'{$url}'+'"]').addClass('active');
	});
	</script>
</block>
